package cn.zsb;

import org.springframework.beans.factory.InitializingBean;

/**
 * @author oldliu
 * @since 1.0
 */
public class HelloSpring implements InitializingBean {
    int age;
    private String msg;

    public void setAge(int i){
        this.age=i;
    }
    public void setMessage(String n){
        this.msg=n;
    }

    public void doInit(){
        System.out.println("参加张家辉的粉丝见面会");
    }
    public void doDes(){
        System.out.println("见面会结束了");
    }
    public void say(){
        System.out.println(msg+",今年"+age);
    }

    @Override
    public void afterPropertiesSet() throws Exception {
        System.out.println("属性赋值后，自定义的init之前：此时：msg"+msg);
    }
}
